<!--$embed{"header.htm"}-->

<!--$if{ op == 'syn' || op == 'find' || op == 'group' || op == 'request'}-->

<!--$if{ _SGLOBAL['guidemode']}-->
<!--$embed{"space_guide.htm"}-->
<!--$else-->
<h2 class="title"><img src="image/icon/friend.gif">好友</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li><a href="space.html?uid=${space['uid']}&do=friend"><span>好友列表</span></a></li>
		<li${actives['find']}><a href="cp.html?ac=friend&op=find"><span>可能认识的人</span></a></li>
		<!--$if{!_SCONFIG['closeinvite']}-->
		<li><a href="cp.html?ac=invite"><span>邀请好友</span></a></li>
		<!--$end-->
		<!--$if{ op=='request'}-->
		<li${actives['request']}><a href="cp.html?ac=friend&op=request"><span>好友请求</span></a></li>
		<!--$elseif{ op=='group'}-->
		<li${actives['group']}><a href="cp.html?ac=friend&op=request"><span>好友分组</span></a></li>
		<!--$end-->
	</ul>
</div>
<!--$end-->

<!--$end-->

<!--$if{ op =='ignore'}-->

<div id="${uid}" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<form method="post" id="friendform_${uid}" name="friendform_${uid}" action="cp.html?ac=friend&op=ignore&uid=${uid}&confirm=1">
	<h1>确定忽略好友关系吗？</h1>
	<p class="btn_line">
		<input type="hidden" name="refer" value="${_SGLOBAL['refer']}">
		<!--$if{ _SGLOBAL['inajax']}-->
		<input type="hidden" name="friendsubmit" value="true" />
		<button name="friendsubmit_btn" type="button" class="submit" value="true" onclick="ajaxpost('friendform_${uid}', '${uid}', 'friend_delete')">确定</button>
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--$else-->
		<button name="friendsubmit" type="submit" class="submit" value="true">确定</button>
		<!--$end-->
	</p>
	
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
</div>

<!--$elseif{ op == 'find'}-->


<!--$if{ nearlist}-->
<div class="c_form">
	<h2 class="l_status title">惊喜，他们就在您的附近</h2>
	<ul class="avatar_list">
		<!--$for{value:nearlist} $set{key = for.index}-->
		<li>
			<div class="avatar48"><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}" target="_blank"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
			<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
			<p class="gray"><a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_near_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--$end-->
	</ul>
</div>
<!--$end-->

<!--$if{ friendlist}-->
<div class="c_form">
	<h2 class="l_status title">他们是您的好友的好友，您也可能认识</h2>
	<ul class="avatar_list">
		<!--$for{value:friendlist} $set{key = for.index}-->
		<li>
			<div class="avatar48"><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}" target="_blank"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
			<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
			<p class="gray"><a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_friend_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--$end-->
	</ul>
</div>
<!--$end-->

<!--$if{ onlinelist}-->
<div class="c_form">
	<h2 class="l_status title">他们当前正在线，加为好友就可以互动啦</h2>
	<ul class="avatar_list">
		<!--$for{value:onlinelist} $set{key = for.index}-->
		<li>
			<div class="avatar48"><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}" target="_blank"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
			<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
			<p class="gray"><a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_online_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--$end-->
	</ul>
</div>
<!--$end-->

<!--$if{ hotlist}-->
<div class="c_form">
	<h2 class="l_status title">人气最高的会员，您也可能认识</h2>
	<ul class="avatar_list">
		<!--$for{value:hotlist} $set{key = for.index}-->
		<li>
			<div class="avatar48"><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}" target="_blank"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
			<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
			<p class="gray"><a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_hot_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--$end-->
	</ul>
</div>
<!--$end-->


<!--$if{ residelist}-->
<div class="c_form">
	<h2 class="l_status title">一个地方的人，都居住在 ${space['resideprovince']} ${space['residecity']}</h2>
	<ul class="avatar_list">
		<!--$for{value:residelist} $set{key = for.index}-->
		<li>
			<div class="avatar48"><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}" target="_blank"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
			<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
			<p class="gray"><a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_reside_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--$end-->
	</ul>
</div>
<!--$end-->


<!--$if{ sexlist}-->
<div class="c_form">
	<h2 class="l_status title">想结识异性朋友吗？推荐给您 <!--$if{!space['marry'] || space['marry'] < 2}-->单身<!--$end-->
	<!--$if{!space['sex'] || space['sex'] < 2}-->美女<!--$else-->帅哥<!--$end--></h2>
	<ul class="avatar_list">
		<!--$for{value:sexlist} $set{key = for.index}-->
		<li>
			<div class="avatar48"><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}" target="_blank"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
			<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
			<p class="gray"><a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_sex_friend_${key}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--$end-->
	</ul>
</div>
<!--$end-->

<form method="post" action="network.html" class="c_form"<!--$if{ _SGLOBAL['guidemode']}--> target="_blank"<!--$end-->>
	<!--$if{ !_SGLOBAL['guidemode']}-->
	<table cellspacing="0" cellpadding="0" class="formtable">
		<caption>
			<h2>高级搜索</h2>
			<p>您可以自己设置搜索条件，寻找与自己志同道合的好友</p>
		</caption>
		<tr>
			<th>用户名</th>
			<td>
				<input type="text" class="t_input" name="username" value="" />
				&nbsp; 姓名 <input type="text" class="t_input" name="name" value="" />
			</td>
		</tr>
		<tr>
			<th>性别</th>
			<td>
				<select id="sex" name="sex">
					<option value="">任意</option>
					<option value="1"${sexarr['1']}>男</option>
					<option value="2"${sexarr['2']}>女</option>
				</select>
				&nbsp; 生日 
				<select id="birthyear" name="birthyear">
					<option value="">年</option>
					<!--$for{num : (curYear..(curYear-80))}-->
					<option value="${num.toString}" <!--$if{num.toString == birthyear}-->selected<!--$end-->>${num.toString}</option>
					<!--$end -->
				</select> 
				<select id="birthmonth" name="birthmonth">
					<option value="">月</option>
					<!--$for{num : (1..12)}-->
					<option value="${num.toString}" <!--$if{num.toString == birthmonth}-->selected<!--$end-->>${num.toString}</option>
					<!--$end -->
				</select> 
				<select id="birthday" name="birthday">
					<option value="">日</option>
					<!--$for{num : (1..31)}-->
					<option value="${num.toString}" <!--$if{num.toString == birthday}-->selected<!--$end-->>${num.toString}</option>
					<!--$end -->
				</select> 
			</td>
		</tr>
		
		<tr>
			<th>血型</th>
			<td>
				<select id="blood" name="blood">
					<option value="">任意</option>
					<!--$for{value : ('A','B','O','AB')}-->
					<option value="${value}" <!--$if{value == blood}-->selected<!--$end-->>${value}</option>
					<!--$end -->
				</select>
				&nbsp; 婚恋 
				<select id="marry" name="marry">
					<option value="">任意</option>
					<option value="1"<!--$if{marry == '1'}--> selected<!--$end-->>单身</option>
					<option value="2"<!--$if{marry == '2'}--> selected<!--$end-->}>非单身</option>
				</select>
			</td>
		</tr>
		
		<tr>
			<th>出生地</th>
			<td>
				<script type="text/javascript" src="source/script_city.js"></script>
				<script type="text/javascript">
				<!--
				showprovince('birthprovince', 'birthcity', '');
				showcity('birthcity', '');
				//-->
				</script>
				&nbsp; 居住地 
				<script type="text/javascript">
				<!--
				showprovince('resideprovince', 'residecity', '');
				showcity('residecity', '');
				//-->
				</script>
			</td>
		</tr>
		<tr>
			<th>QQ</th>
			<td>
				<input type="text" name="qq" value="" class="t_input" />
				&nbsp; MSN 
				<input type="text" name="msn" value="" class="t_input" />
			</td>
		</tr>
		<tr>
			<th>年龄段</th>
			<td>
				<input type="text" name="startage" value="" size="10" class="t_input" /> ~ <input type="text" name="endage" value="" size="10" class="t_input" />
			</td>
		</tr>
		<tr>
			<th>加入的群组</th>
			<td>
			<select name="fieldid">
				<option value="">请选择群组分类</option>
				<!--$for{map:_SGLOBAL['profield']}--><!--$set{value=map.value}-->
				<option value="${value.fieldid}"<!--$if{value.fieldid == selectedFieldId}-->selected<!--$end-->>${value.title}</option>
				<!--$end-->
			</select>
			群组名 <input type="text" class="t_input" name="fieldname" value="${fieldname}" />
			</td>
		</tr>
		
		<!--$for{value:_SGLOBAL['profilefield']}-->
			<!--$if{value.allowsearch}-->
				<tr>
					<th>${value.title}</th>
					<td>
						${profilefieldId2Html[value.fieldid]}
					</td>
				</tr>
			<!--$end-->
		<!--$end-->
		</table>
		<!--$end-->

		<table cellspacing="0" cellpadding="0" class="formtable">
		<!--$if{ _SGLOBAL['guidemode']}-->
		<caption>
			<h2>进入我的首页</h2>
			<p>您需要点击下面的按钮，结束安家过程</p>
		</caption>
		<tr>
			<th width="23%">&nbsp;</th>
			<td>
				<input type="button" name="closeguide" value="进入我的首页" class="submit" onclick="window.location='space.html?do=home&view=guide&step=4';" />
				<br>结束向导后，您还可以在导航菜单中重新找到向导入口
			</td>
		</tr>
		<!--$else-->
		<tr>
			<th>&nbsp;</th>
			<td>
			<input type="hidden" name="ac" value="space" />
			<input type="hidden" name="searchmode" value="2" />
			<input type="submit" name="findsubmit" value="寻找好友" class="submit" />
			</td>
		</tr>
		<!--$end-->
	</table>
</form>

<!--$elseif{ op=='changegroup'}-->

<div id="${uid}" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<form method="post" id="changegroupform_${uid}" name="changegroupform_${uid}" action="cp.html?ac=friend&op=changegroup&uid=${uid}">
	<div class="h_status">设置好友分组</div>
	
	<table cellspacing="2" cellpadding="2"><tr>
	<!--$for{value:groups} $set{key = for.index}-->
	<td><input type="radio" name="group" value="${key}"${groupselect['${key}']}> ${value}</td>
	<!--$if{ for.index%2==1}--></tr><tr><!--$end-->
	<!--$end-->
	</tr></table>

	<p class="btn_line">
		<input type="hidden" name="refer" value="${_SGLOBAL['refer']}">
		<!--$if{ _SGLOBAL['inajax']}-->
		<input type="hidden" name="changegroupsubmit" value="true" />
		<button name="changegroupsubmit_btn" type="button" class="submit" value="true" onclick="ajaxpost('changegroupform_${uid}', '${uid}', 'friend_changegroup')">确定</button>&nbsp;
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--$else-->
		<button name="changegroupsubmit" type="submit" class="submit" value="true">确定</button>
		<!--$end-->
	</p>
	
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
</div>

<!--$elseif{ op=='group'}-->

<div id="content" style="width: 640px;">
	<form method="post" action="cp.html?ac=friend&op=group&ref">
<!--$if{ list}-->
	<div class="thumb_list" id="friend_ul">
		<ul>
		<!--$for{value:list} $set{key = for.index}-->
			<li>
				<div class="avatar48"><a href="space.html?uid=${value['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" width="48" height="48" /></a></div>
				<div class="thumbTitle"><input type="checkbox" name="fuids[]" value="${value['uid']}" /><a href="space.html?uid=${value['uid']}">${_SN[value['uid']]}</a></div>
				<div class="setti">${value['group']}</div>
			</li>
		<!--$end-->
		</ul>
	</div>
	<div class="page">${multi}</div>
	<div>
		<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'fuids')" /><label for="chkall">全选</label></td>
		设置用户组：<select name="group">
			<!--$for{value:groups} $set{key = for.index}-->
				<option value="${key}">${value}</option>
			<!--$end-->
			</select>
			<input type="submit" name="btnsubmit" value="确定" class="submit" />
	</div>
<!--$else-->
	<div class="c_form">
		没有相关用户列表。
	</div>
<!--$end-->
	<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
	<input type="hidden" name="groupsubmin" value="true" />
	</form>
</div>

<div id="sidebar" style="width: 150px;">
	<div class="cat">
	<h3>好友分组</h3>
	<ul class="post_list line_list">
		<li<!--$if{ !group}--> class="current"<!--$end-->><a href="cp.html?ac=friend&op=group">全部好友</a></li>
		<!--$for{value:groups}-->
		<li<!--$if{group && group.toInteger==for.index}--> class="current"<!--$end-->><a href="cp.html?ac=friend&op=group&group=${for.index}">${value}</a></li>
		<!--$end-->
	</ul>
	</div>
</div>

<!--$elseif{ op=='groupname'}-->

<div id="${group}" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<form method="post" id="groupnameform_${group}" name="groupnameform_${group}" action="cp.html?ac=friend&op=groupname&group=${group}">
	<h1>设置新好友分组名</h1>
	<div class="c_form">
		新名称：<input type="text" name="groupname" value="${groups[group.toInteger]}" size="15" class="t_input">
		<input type="hidden" name="refer" value="${_SGLOBAL['refer']}">
		<!--$if{ _SGLOBAL['inajax']}-->
		<input type="hidden" name="groupnamesubmit" value="true" />
		<input type="button" name="groupnamesubmit_btn" value="确定" class="submit" onclick="ajaxpost('groupnameform_${group}', '${group}', 'friend_changegroupname')" />
		<input type="button" name="btnclose" value="取消" onclick="hideMenu();" class="button" />
		<!--$else-->
		<input type="submit" name="groupnamesubmit" value="确定" class="submit" />
		<!--$end-->
	</div>
	
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
</div>


<!--$elseif{ op=='groupignore'}-->

<div id="${group}" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<form method="post" id="groupignoreform" name="groupignoreform" action="cp.html?ac=friend&op=groupignore&group=${group}">
	<!--$if{!space['privacyMap']['filter_gid'][group.toInteger]}-->
	<h1>屏蔽该用户组动态</h1>
	<p>在首页不显示该用户组的好友动态</p>
	<!--$else-->
	<h1>首页该用户组动态</h1>
	<p>在首页显示该用户组的好友动态</p>
	<!--$end-->
	<p class="btn_line">
		<input type="hidden" name="refer" value="${_SGLOBAL['refer']}">
		<!--$if{ _SGLOBAL['inajax']}-->
		<input type="hidden" name="groupignoresubmit" value="true" />
		<button name="groupignoresubmit_btn" type="submit" class="submit" value="true">确定</button>
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--$else-->
		<button name="groupignoresubmit" type="submit" class="submit" value="true">确定</button>
		<!--$end-->
	</p>
	
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
</div>

<!--$elseif{ op=='request'}-->

<div class="l_status">
	<div class="r_option">
		<a href="cp.html?ac=friend&op=ignore&confirm=1&key=${space['key']}" onclick="return confirm('您确定要忽略所有的好友申请吗？');">忽略所有好友申请(慎用)</a>
		<!--$if{isAdmin}--> | <a href="cp.html?ac=friend&op=addconfirm&key=${space['key']}">批准全部申请</a><!--$end-->
	</div>
	<span id="add_friend_div">请选定好友的申请进行批准或忽略</span>
</div>
<!--$if{ list}-->
<div class="thumb_list" id="friend_ul">
<table cellspacing="6" cellpadding="0">
<!--$for{value:list}-->
<tr>
	<td class="thumb <!--$if{ ols[value[uid]]}-->online<!--$end-->">
		<table cellpadding="0" cellspacing="0">
			<tr>
				<td class="image">
				<div class="ar_r_t"><div class="ar_l_t"><div class="ar_r_b"><div class="ar_l_b">
				<a href="space.html?uid=${value['uid']}" class="avatarlink"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'middle')}-->" alt="${_SN[value['uid']]}" /></a>
				</div></div></div></div>
				</td>
				<td>
					<h6 class="l_status"><a href="space.html?uid=${value['uid']}">${_SN[value['uid']]}</a></h6>
					<div id="friend_${value['uid']}">
					<!--$if{ value['note']}--><div class="quote"><span id="quote" class="q">${value['note']}</span></div><!--$end-->
					<p><!--${&com.heaven.web.utils.Common.sgmdate('MM-dd HH:mm',value['dateline'].toInteger,true)}--></p>
					<!--$if{ value['cfcount']}--><p><a href="cp.html?ac=friend&op=getcfriend&fuid=${value['cfriend']}" id="a_cfriend_${for.index}" onclick="ajaxmenu(event, this.id, 99999, '', -1)">你们有 ${value['cfcount']} 个共同好友</a></p><!--$end-->
					<p style="margin-top:1em;">
						<a href="cp.html?ac=friend&op=add&uid=${value['uid']}" id="a_f_r_${value['uid']}" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="submit a">批准申请</a>
						<a href="cp.html?ac=friend&op=ignore&uid=${value['uid']}&confirm=1" id="a_f_i_${value['uid']}" onclick="ajaxmenu(event, this.id, 1, 'myfriend')" class="button a">忽略</a>
					</p>
					</div>
				</td>
			</tr>
			<tbody id="cf_${value['uid']}"></tbody>
		</table>
	</td>
</tr>
<!--$end-->
</table>
</div>
<div class="page">${multi}</div>
<!--$else-->
<div class="c_form">
	没有新的好友请求。
</div>
<!--$end-->

<script>
	function myfriend(id) {
		var tbid = id.substr(6);
		document.getElementById('friend_'+tbid).innerHTML = '忽略了当前用户的好友申请';
	}
</script>

<!--$elseif{ op=='getcfriend'}-->

<div id="cfriend" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end--> style="width:400px;">
<!--$if{ _SGLOBAL['inajax']}-->
	<h1>共同好友</h1>
	<a href="javascript:hideMenu();" class="float_del" title="关闭">关闭</a>
	<div class="popupmenu_inner">
<!--$end-->
<div class="h_status">最多显示15位共同的好友</div>
<ul class="avatar_list">
	<!--$for{value:list}-->
	<li>
		<div class="avatar48"><a href="space.html?uid=${value['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(value['uid'],'small')}-->" alt="${_SN[value['uid']]}" /></a></div>
		<p><a href="space.html?uid=${value['uid']}" title="${_SN[value['uid']]}">${_SN[value['uid']]}</a></p>
	</li>
	<!--$end-->
</ul>
<!--$if{ _SGLOBAL['inajax']}--></div><!--$end-->
</div>

<!--$elseif{ op=='add'}-->

<div id="${tospace['uid']}" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<!--$if{ _SGLOBAL['inajax']}-->
<h1>加好友</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div class="popupmenu_inner">
<!--$end-->
<form method="post" id="addform_${tospace['uid']}" name="addform_${tospace['uid']}" action="cp.html?ac=friend&op=add&uid=${tospace['uid']}">
	<table cellspacing="0" cellpadding="3">
		<tr>
			<th width="52"><a href="space.html?uid=${tospace['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(tospace['uid'],'small')}-->" alt="${_SN[tospace['uid']]}" width="48" height="48" /></th>
			<td>加 <strong>${_SN[tospace['uid']]}</strong> 为好友，附言：<br />
				<input type="text" name="note" value="" size="20" class="t_input" style="width: 300px;"  onkeydown="ctrlEnter(event, 'addsubmit_btn', 1);" />
				<p class="gray">(附言为可选，${_SN[tospace['uid']]} 会看到这条附言，最多50个字符)</p>
			</td>
		</tr>
		<tr>
			<th>&nbsp;</th>
			<td>
				分组: <select name="gid">
				<!--$for{value:groups}
				<option value="${for.index}">${value}</option>
				<!--$end-->
				</select>
				<input type="hidden" name="refer" value="${_SGLOBAL['refer']}" />
				<input type="hidden" name="addsubmit" value="true" />
				<!--$if{ _SGLOBAL['inajax']}-->
				<input type="button" name="addsubmit_btn" id="addsubmit_btn" value="确定" class="submit" onclick="ajaxpost('addform_${tospace['uid']}', '${tospace['uid']}')" />
				<!--$else-->
				<input type="submit" name="addsubmit_btn" id="addsubmit_btn" value="确定" class="submit" />
				<!--$end-->
			</td>
	</table>
	
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
<!--$if{ _SGLOBAL['inajax']}--></div><!--$end-->
</div>


<!--$elseif{ op=='add2'}-->

<div id="${tospace['uid']}" <!--$if{ !_SGLOBAL['inajax']}-->class="inpage"<!--$end-->>
<!--$if{ _SGLOBAL['inajax']}-->
<h1>批准请求</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div class="popupmenu_inner" style="width: 400px;">
<!--$end-->
<form method="post" id="addratifyform_${tospace['uid']}" name="addratifyform_${tospace['uid']}" action="cp.html?ac=friend&op=add&uid=${tospace['uid']}">
	<table cellspacing="0" cellpadding="3">
		<tr>
			<th width="52"><a href="space.html?uid=${tospace['uid']}"><img src="<!--${&com.heaven.web.utils.Common.avatar(tospace['uid'],'small')}-->" alt="${_SN[tospace['uid']]}" width="48" height="48" /></th>
			<td>
			<div class="l_status">批准 <strong>${_SN[tospace['uid']]}</strong> 的好友请求，并分组：</div>
				<table cellspacing="2" cellpadding="2"><tr>
				<!--$for{value:groups} $set{key = for.index}-->
				<td><input type="radio" name="gid" id="group_${key}" value="${key}"${groupselect['$key']}> <label for="group_${key}">${value}</label></td>
				<!--$if{ key%2==1}--></tr><tr><!--$end-->
				<!--$end-->
				</tr></table>
				
				<p>
				<input type="hidden" name="refer" value="${_SGLOBAL['refer']}" />
				<!--$if{ _SGLOBAL['inajax']}-->
				<input type="hidden" name="add2submit" value="true" />
				<input type="button" name="add2submit_btn" value="批准" class="submit" onclick="ajaxpost('addratifyform_${tospace['uid']}', '${tospace['uid']}', 'myfriend_post')" />
				<!--$else-->
				<input type="submit" name="add2submit" value="批准" class="submit" />
				<!--$end-->
				</p>
			</td>
	</table>
	
<input type="hidden" name="formhash" value="<!--${&com.heaven.web.utils.Common.formhash()}-->" />
</form>
<!--$if{ _SGLOBAL['inajax']}--></div><!--$end-->
</div>

<!--$end-->
<!--$embed{"footer.htm"}-->
